<?
Error_Reporting(E_ALL & ~E_NOTICE);

#-----------including phpbb

define('IN_PHPBB', true);
$phpbb_root_path = ((defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '.').'/forum/';
                                          
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$userdata = $user->data;

#-----------configure host 

 define ("database","motolife_adv");
 define ("host","localhost");
 define ("user","root");
 define ("passwd","");
 
#-----------database

 $tbl_gb = "gb";
 $tbl_mototype = "moto_type"; 
 $tbl_adv = "moto_adv";
 $tbl_marka = "moto_marka";
 $tbl_model = "moto_model";
 $tbl_clients = "clients"; 
 $tbl_arenda = "arenda"; 
 $tbl_clients_item = "clients_item";
 $tbl_whois = "whois";
 $tbl_photogallerys = "photogallerys";
 $tbl_photogallery = "photogallery";
 $tbl_prices = "prices"; 
 $tbl_price = "price";
 $tbl_questions = "questions";
 $tbl_answers = "answers";
 $tbl_statquestions = "stat_questions";
 $tbl_ips = "ips_questions"; 
 $tbl_story = "moto_story"; 
 $tbl_journal = "moto_journal"; 
 $tbl_comments = "moto_journal_comments";
   
#-----------Advertisement-----------------------

 $advph_dir = "adv_images/";
 $advph_bg_height = 600;
 $advph_md_height = 200;
 $advph_sm_height = 88;
  
 $ct_months = array ("","января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря");  
  
#-----------creating classes 
 
 include_once "classes/database.class.php";
 $c_db = new Database(host,user,passwd,database);
 include_once "classes/all.class";
 $c_all = new All($ct_months);
 include_once "classes/guestbook.class";
 $c_gb = new Guestbook($c_db,$tbl_gb);
 include_once "classes/adv.class";
 $c_adv = new Adv($c_db,$c_all,$tbl_mototype,$tbl_adv,$advph_dir,$advph_bg_height,$advph_md_height,$advph_sm_height);
 include_once "classes/news_class.php";
 $c_news = new News($c_db);
 include_once "classes/questions_class.php"; 
 $c_questions = new Questions($c_db,$tbl_questions,$tbl_answers,$tbl_statquestions,$tbl_ips);
 include_once "classes/story_class.php";
 $c_story = new Story($c_db,$tbl_story);
 include_once "classes/journal_class.php";
 $c_journal = new Journal($c_db, $tbl_journal, $tbl_comments);
 include_once "classes/phpbb.class.php";
 $c_phpbb = new Phpbb();
 
 session_start();

 include_once "configSmarty.php";
?>